package com.github.gaojh.example.filter;

import com.github.gaojh.ioc.annotation.WebFilter;
import com.github.gaojh.mvc.filter.Filter;
import com.github.gaojh.server.http.HttpContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author 高建华
 * @date 2019-04-16 20:52
 */
@WebFilter(pathPatterns = {"/test"},order = 6)
public class Demo2Filter implements Filter {
    private static Logger logger = LoggerFactory.getLogger(Demo2Filter.class);

    @Override
    public boolean doBefore(HttpContext httpContext) throws Exception {
        System.out.println("demo2 dobefore");
        return true;
    }

    @Override
    public void doAfter(HttpContext httpContext) throws Exception {
        System.out.println("demo2 after");
    }
}
